import { lazy } from "react";
import {
  AppOutline,
  UserOutline
} from 'antd-mobile-icons'

const Index = lazy(()=>import('../pages/index'))
const User = lazy(()=>import('../pages/user'))
const Home = lazy(()=>import('../pages/home'))
const Detail = lazy(()=>import('../pages/detail'))

export let homeRouters = [
  {
    path: '/',
    element: <Index></Index>,
    title: '首页',
    icon: <AppOutline />
  },
  {
    path: '/user',
    element: <User></User>,
    title: '我的',
    icon: <UserOutline />
  },
]

export let routers = [
  {
    path:'/',
    element:<Home></Home>,
    children:homeRouters
  },
  {
    path:"/detail",
    element:<Detail></Detail>
  }
]